//
//  BaseNaviVC.m
//  itboyeios_gd
//
//  Created by imac on 15/10/30.
//  Copyright © 2015年 Boye. All rights reserved.
//

#import "BaseNavVC.h"

@interface BaseNavVC ()

@end

@implementation BaseNavVC

#pragma mark - 控制器 视图执行方法
- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.navigationBar.backgroundColor = [UIColor whiteColor];
    
    //设置导航栏标题颜色
    UIColor *titleColor = [UIColor blackColor];
    NSDictionary *dic = [NSDictionary dictionaryWithObject:titleColor forKey:NSForegroundColorAttributeName];
    self.navigationBar.titleTextAttributes = dic;
    
    //设置导航栏为不透明
    self.navigationBar.translucent = NO;
    
}
- (void)viewDidAppear:(BOOL)animated {
    [super viewDidAppear:animated];

}





#pragma mark -
- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated {
//    CATransition *anim = [CATransition animation];
//    anim.type = kCATransitionMoveIn; // 动画过渡类型
//    anim.subtype = kCATransitionFromLeft; // 动画过渡方向
//    anim.duration = 1; // 动画持续1s
//    [self.view.layer addAnimation:anim forKey:nil];
    
    [super pushViewController:viewController animated:animated];
}

- (NSArray<UIViewController *> *)popToRootViewControllerAnimated:(BOOL)animated {
//    CATransition *anim = [CATransition animation];
//    anim.type = kCATransitionMoveIn; // 动画过渡类型
//    anim.subtype = kCATransitionFromRight; // 动画过渡方向
//    anim.duration = 1; // 动画持续1s
//    [self.view.layer addAnimation:anim forKey:nil];
    
    return [super popToRootViewControllerAnimated:animated];
}
- (NSArray<UIViewController *> *)popToViewController:(UIViewController *)viewController animated:(BOOL)animated {
//    CATransition *anim = [CATransition animation];
//    anim.type = kCATransitionMoveIn; // 动画过渡类型
//    anim.subtype = kCATransitionFromRight; // 动画过渡方向
//    anim.duration = 1; // 动画持续1s
//    [self.view.layer addAnimation:anim forKey:nil];
    
    return [super popToViewController:viewController animated:animated];
    
}
- (UIViewController *)popViewControllerAnimated:(BOOL)animated {
    
//    CATransition *anim = [CATransition animation];
//    anim.type = kCATransitionMoveIn; // 动画过渡类型
//    anim.subtype = kCATransitionFromRight; // 动画过渡方向
//    anim.duration = 1; // 动画持续1s
//    [self.view.layer addAnimation:anim forKey:nil];
    
    return [super popViewControllerAnimated:animated];
}
@end
